package {
	
	import flash.events.Event;
	
	public class SplitEvent extends Event {
		
		public static const SPLIT_COMPLETE:String = "splitComplete";
		public static const CUBE_MADE:String = "cubeMade";
		
		private var _piecesMade:Number;
		private var _position:int;
		
		public function SplitEvent(type:String, piecesMade:int, position:int, bubbles:Boolean=false, cancelable:Boolean=true) {
			_piecesMade = piecesMade;
			_position = position;
			super(type, bubbles, cancelable);
		}
		
		public function get piecesMade():int {
			return _piecesMade;
		}
		
		public function get position():int {
			return _position;
		}
		
		override public function clone():Event {
			return new SplitEvent(type, piecesMade, position, bubbles, cancelable);
		}
		
		override public function toString():String {
			return formatToString("SplitEvent", "piecesMade", "position");
		}
	}	
}